Fix setting of private->shaped when setting input shape
authorAlexander Larsson <alexl@redhat.com>
Tue, 27 Jan 2009 13:57:37 +0000 (14:57 +0100)
committerAlexander Larsson <alex@localhost.localdomain>
Thu, 2 Apr 2009 08:15:28 +0000 (10:15 +0200)
I.e. it should only be set/unset when setting ShapeBounding.

gdk/x11/gdkwindow-x11.c

index 0557d5393614b8e635f0c9d3d84069bc8d8e70f9..6e3b788b085a0b6e921c44bf0a33129c1e05eaa4 100644 (file)
@@ -3397,7 +3397,9 @@ do_shape_combine_region (GdkWindow       *window,
          ? gdk_display_supports_shapes (GDK_WINDOW_DISPLAY (window))
          : gdk_display_supports_input_shapes (GDK_WINDOW_DISPLAY (window)))
        {
-         private->shaped = FALSE;
+         if (shape == ShapeBounding)
+           private->shaped = FALSE;
+         
          if (shape == ShapeBounding)
            _gdk_x11_window_tmp_unset_parent_bg (window, TRUE);
          XShapeCombineMask (GDK_WINDOW_XDISPLAY (window),
@@ -3419,7 +3421,8 @@ do_shape_combine_region (GdkWindow       *window,
       gint n_rects = 0;
       XRectangle *xrects = NULL;
 
-      private->shaped = shape == ShapeBounding;
+      if (shape == ShapeBounding)
+       private->shaped = TRUE;
 
       _gdk_region_get_xrectangles (shape_region,
                                    0, 0,